package com.sqfw.project.wp.service.impl;

import java.util.List;
import com.sqfw.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sqfw.project.wp.mapper.WpHurryLogMapper;
import com.sqfw.project.wp.domain.WpHurryLog;
import com.sqfw.project.wp.service.IWpHurryLogService;

/**
 * 催单日志Service业务层处理
 * 
 * @author lx
 * @date 2023-06-28
 */
@Service
public class WpHurryLogServiceImpl implements IWpHurryLogService 
{
    @Autowired
    private WpHurryLogMapper wpHurryLogMapper;

    /**
     * 查询催单日志
     * 
     * @param scid 催单日志主键
     * @return 催单日志
     */
    @Override
    public WpHurryLog selectWpHurryLogByScid(Long scid)
    {
        return wpHurryLogMapper.selectWpHurryLogByScid(scid);
    }

    /**
     * 查询催单日志列表
     * 
     * @param wpHurryLog 催单日志
     * @return 催单日志
     */
    @Override
    public List<WpHurryLog> selectWpHurryLogList(WpHurryLog wpHurryLog)
    {
        return wpHurryLogMapper.selectWpHurryLogList(wpHurryLog);
    }

    /**
     * 新增催单日志
     * 
     * @param wpHurryLog 催单日志
     * @return 结果
     */
    @Override
    public int insertWpHurryLog(WpHurryLog wpHurryLog)
    {
        wpHurryLog.setCreateTime(DateUtils.getNowDate());
        return wpHurryLogMapper.insertWpHurryLog(wpHurryLog);
    }

    /**
     * 修改催单日志
     * 
     * @param wpHurryLog 催单日志
     * @return 结果
     */
    @Override
    public int updateWpHurryLog(WpHurryLog wpHurryLog)
    {
        wpHurryLog.setUpdateTime(DateUtils.getNowDate());
        return wpHurryLogMapper.updateWpHurryLog(wpHurryLog);
    }

    /**
     * 批量删除催单日志
     * 
     * @param scids 需要删除的催单日志主键
     * @return 结果
     */
    @Override
    public int deleteWpHurryLogByScids(Long[] scids)
    {
        return wpHurryLogMapper.deleteWpHurryLogByScids(scids);
    }

    /**
     * 删除催单日志信息
     * 
     * @param scid 催单日志主键
     * @return 结果
     */
    @Override
    public int deleteWpHurryLogByScid(Long scid)
    {
        return wpHurryLogMapper.deleteWpHurryLogByScid(scid);
    }
}
